const state = {
  count: 0,
  name: "马六",
  addData: 1,
  delData: 1
};
const mutations = {
  changewithName(state, payload) {
    state.name = payload.name;
  }
};
const actions = {
  changewithNameAsync({ commit }, payload) {
    setTimeout(() => {
      commit("changewithName", payload);
    }, 1000);
  }
};
const getters = {
  formatterName: state => {
    let postFix = "";
    if (state.name === "马六") {
      postFix = "你是最棒的";
    }
    return state.name + postFix;
  }
};
export default {
  namespaced: true,
  state,
  mutations,
  actions,
  getters
};
